#pragma once
#include "DXAMLCommon.h"
#include "IPlatformServices.h"
#include "IPALResourceProvider.h"
#include "IPALUri.h"
#include "IPALGraphicsDeviceManager.h"
#include "IPALSurfaceUpdatePoolMap.h"
#include "IPALDownloadResponse.h"
#include "IPALApplicationDataProvider.h"
#include "IPALWorkItemFactory.h"


class CCommonPlatformServices :
	public IPlatformServices
{
public: 
	CCommonPlatformServices();
	virtual HRESULT GetApplicationID(struct IPALUri * pXapUri, XBOOL bRegister, CXString * * ppstrAppID);
	virtual HRESULT UnregisterApplicationID(CXString * pstrAppID);
	virtual void SetCanLoadAssembliesDomainNeutral(XBOOL pValue);
	virtual XBOOL CanLoadAssembliesDomainNeutral();
	virtual void SetCustomControlHostExists(XBOOL pValue);
	virtual XBOOL CustomControlHostExists();
	virtual HRESULT CreateResourceProvider(struct IPALResourceProvider * * ppResourceProvider);
protected: 
	virtual HRESULT GetOfflineApplicationStoreDirectory(XUINT32, struct IPALDirectory * *) = 0;
private: 
	HRESULT GetAppIdIndexDirectory(XUINT32, struct IPALDirectory * *);
	XINT32 m_pCanLoadAssembliesDomainNeutral;
	XBOOL m_pCustomControlHostExists;
};

